#-------------------#
#! python3
# coding:utf-8
# descripiton:
#
#------------------#

import itchat

import matplotlib.pyplot as plt
#import pandas as import pd

itchat.login()

friends=itchat.get_friends(update=True)
#print(friends[1])

print(len(friends)+1)
male_size=0
female_size=0
unknown_size=0
total=len(friends)+1

for people in friends[1:]:
    if people['sex']==1:
        male_size+=1
    elif people['sex']==2:
        female_size+=1
    else:
        unknown_size+=1
print('您的壕友性别分配比例如下：')
print('男性比例：'，'{}.2f%'.format(float(male_size/total)*100))
print('女性比例：'，'{}.2f%'.format(float(female_size/total)*100))
print('其他比例：'，'{}.2f%'.format(float(unknown_size/total)*100))
